#include "include.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <time.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include <string.h>

bool    FLAG_I2C_ERROR;
UINT8   I2CADR;
UINT8   I2C_INTADR;
UINT8   I2c_Select;

void delay_us( UINT8 uscount )
{
    return ;
}


void Delay_ms( UINT16 mscount )
{
    int rc;
    struct timespec ts_start, ts_end;

    //start time before call function
    rc = clock_gettime(CLOCK_MONOTONIC, &ts_start);

    msleep(mscount);

    //end time before call function
    rc = clock_gettime(CLOCK_MONOTONIC, &ts_end);

    //printf("[%d] reports %ld.%09ld seconds\n", mscount, ts_end.tv_sec - ts_start.tv_sec, ts_end.tv_nsec - ts_start.tv_nsec);
}

